package com.bootdo.lvyou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou.dao.LvyouScenicMarkerDao;
import com.bootdo.lvyou.domain.LvyouScenicMarker;
import com.bootdo.lvyou.service.LvyouScenicMarkerService;



@Service
public class LvyouScenicMarkerServiceImpl implements LvyouScenicMarkerService {
	@Autowired
	private LvyouScenicMarkerDao lvyouScenicMarkerDao;
	
	@Override
	public LvyouScenicMarker get(Long id){
		return lvyouScenicMarkerDao.get(id);
	}
	
	@Override
	public List<LvyouScenicMarker> list(Map<String, Object> map){
		return lvyouScenicMarkerDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouScenicMarkerDao.count(map);
	}
	
	@Override
	public int save(LvyouScenicMarker lvyouScenicMarker){
	
		if(lvyouScenicMarker.getId() != null) {
			return lvyouScenicMarkerDao.update(lvyouScenicMarker);
		}else {
			return lvyouScenicMarkerDao.save(lvyouScenicMarker);
		}		
	
		
	}
	
	@Override
	public int update(LvyouScenicMarker lvyouScenicMarker){
		return lvyouScenicMarkerDao.update(lvyouScenicMarker);
	}
	
	@Override
	public int remove(Long id){
		return lvyouScenicMarkerDao.remove(id);
	}

	@Override
	public int removeByTypeAndRefId(LvyouScenicMarker lvyouScenicMarker) {
		return lvyouScenicMarkerDao.removeByTypeAndRefId(lvyouScenicMarker);
	}

	@Override
	public int batchRemove(Long[] ids){
		return lvyouScenicMarkerDao.batchRemove(ids);
	}
	
}
